<%--@elvariable id="efficiency" type="com.infitecs.eyas.boiler.model.Efficiency"--%>
<%--@elvariable id="operateField" type="com.infitecs.eyas.power.model.OperateField"--%>

<%--
  Created by IntelliJ IDEA.
  User: Demon
  Date: 2015/5/13
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet box">
                        <div class="portlet-body form">
                            <div class="form-body">
                                <!--BEGIN ROW 1-->
                                <!--BEGIN ROW 2-->
                                <div class="row margin-bottom-20">
                                    <!--BEGIN LEFT-->
                                    <div class="col-md-6">
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                                <label id="E52Label" class="control-label col-md-3"
                                                       style="padding-left: 0px; padding-right: 0px;" for="E52">
                                                    机械未完全燃烧损失
                                                </label>

                                                <div class="col-md-5">
                                                    <input type="text" class="form-control input-inline"
                                                           id="E52" value="${efficiency!=null?efficiency.e52Show:""}">
                                                        <span class="help-inline">
                                                        %
                                                            <input type="checkbox" id="e52State" name="e52State"
                                                                    <c:if test="${efficiency!=null&&operateField.e52State=='1'}">
                                                                       checked
                                                                    </c:if>
                                                                    >
                                                        </span>
                                                </div>
                                                <div class="col-md-2">
                                                    <button class="btn green" onclick="$('#modal').modal('show')"
                                                            id="calculateE51">计算
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                                <label class="control-label col-md-3"
                                                       style="padding-left: 0px; padding-right: 0px;" for="E53">
                                                    灰渣物理热损失
                                                </label>

                                                <div class="col-md-5">
                                                    <input type="text" class="form-control input-inline"
                                                        readonly   id="E53" value="${efficiency!=null?efficiency.e53Show:""}">
                                                            <span class="help-inline">
                                                            %</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                            <label id="E89Label" class="control-label col-md-3"
                                                   style="padding-left: 0px; padding-right: 0px;" for="E89">
                                                锅炉效率（低位）
                                            </label>

                                            <div class="col-md-9">
                                                <input type="text" class="form-control input-inline"
                                                       id="E89" value="${efficiency!=null?efficiency.e89Show:""}">
                                                            <span class="help-inline">
                                                            %
                                                         <input type="checkbox" id="e89State" name="e89State"
                                                         <c:if test="${efficiency!=null&&operateField.e89State=='1'}">
                                                            checked
                                                         </c:if>
                                                           >
                                                            </span>
                                            </div>
                                        </div>
                                        </div>
                                    </div>
                                    <!--END LEFT-->
                                    <!--BEGIN RIGHT-->
                                    <div class="col-md-6">
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                                <label class="control-label col-md-3"
                                                       style="padding-left: 0px; padding-right: 0px;" for="E88">
                                                    锅炉排烟损失
                                                </label>

                                                <div class="col-md-5">
                                                    <input type="text" class="form-control input-inline"
                                                        readonly  id="E88" value="${efficiency!=null?efficiency.e88Show:""}">
                                                            <span class="help-inline">
                                                            %</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3"
                                                       style="padding-left: 0px; padding-right: 0px;" for="E54">
                                                    外部冷却损失及未计入热损失
                                                </label>

                                                <div class="col-md-5">
                                                    <input type="text" class="form-control input-inline"
                                                           id="E54"value="${efficiency!=null?efficiency.e54Show:"0.4"}">
                                                            <span class="help-inline">
                                                            %</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-15">
                                            <div class="form-group">
                                                <label id="E90Label" class="control-label col-md-3"
                                                       style="padding-left: 0px; padding-right: 0px;" for="E90">
                                                    锅炉效率（高位）
                                                </label>

                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="E90"  value="${efficiency!=null?efficiency.e90Show:""}">
                                                                <span class="help-inline">
                                                                %
                                                        <input type="checkbox" id="e90State" name="e90State"
                                                        <c:if test="${efficiency!=null&&operateField.e90State=='1'}">
                                                           checked
                                                        </c:if>
                                                                >
                                                        </span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--END RIGHT-->
                                </div>
                                <!--END ROW 2-->
                                <!--BEGIN ROW 3-->
                                <div class="row">
                                    <div class="col-md-12">
                                        <table style="height: 20% ;width: 80%;" border="0"
                                               cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td rowspan="2" valign="middle">锅炉燃料量</td>
                                                <td>
                                                    <input type="text" class="form-control input-inline"
                                                           id="E92" value="${efficiency!=null?efficiency.e92Show:""}">
                                                    <span class="help-inline">
                                                    kg/s
                                                        <input type="checkbox" id="e92State" name="e92State"
                                                        <c:if test="${efficiency!=null&&operateField.e92State=='1'}">
                                                           checked
                                                        </c:if>
                                                                >
                                                    </span>

                                                <td rowspan="2" align="center">锅炉计算燃煤量</td>
                                                <td>
                                                    <input type="text" class="form-control input-inline"
                                                           id="E94" value="${efficiency!=null?efficiency.e94Show:""}">
                                                    <span class="help-inline">
                                                    kg/s
                                                        <input type="checkbox" id="e94State" name="e94State"
                                                        <c:if test="${efficiency!=null&&operateField.e94State=='1'}">
                                                           checked
                                                        </c:if>
                                                                >
                                                    </span>
                                                </td>
                                                <%--<td rowspan="2" valign="middle">--%>
                                                    <%--<button class="btn green" id="calculateTheLastFour">计算</button>--%>
                                                <%--</td>--%>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <input type="text" class="form-control input-inline"
                                                           id="E93" value="${efficiency!=null?efficiency.e93Show:""}">
                                                    <span class="help-inline">
                                                    t/h
                                                        <input type="checkbox" id="e93State" name="e93State"
                                                        <c:if test="${efficiency!=null&&operateField.e93State=='1'}">
                                                           checked
                                                        </c:if>
                                                                >
                                                    </span>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control input-inline"
                                                           id="E95" value="${efficiency!=null?efficiency.e95Show:""}">
                                                    <span class="help-inline">
                                                    t/h
                                                        <input type="checkbox" id="e95State" name="e95State"
                                                        <c:if test="${efficiency!=null&&operateField.e95State=='1'}">
                                                           checked
                                                        </c:if>
                                                          >
                                                    </span>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="form-body">
                                        <div class="row">
                                            <div class="col-md-4">
                                            </div>
                                            <div class="col-md-6">
                                                <button type="button" class="btn green" id="save"
                                                        onclick="efficiency.efficiencySave()">确定
                                                </button>
                                                <button type="button" class="btn green" id="nextPage"
                                                        onclick="efficiency.efficiencyNext()">下一页
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade bs-modal-lg" id="modal" tabindex="-1" data-keyboard="false" aria-hidden="true"
     data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" id="modalContent">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title" id="modalTitle"></h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label col-md-3"
                                   style="padding-left: 0px; padding-right: 0px;" for="E51">
                                灰渣中的含碳量C
                            </label>

                            <div class="col-md-5">
                                <input type="text" class="form-control input-inline"
                                       id="E51" value="${efficiency!=null?efficiency.e51:""}">
                                                            <span class="help-inline">
                                                            %</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <span style="color: red">帮助</span>：当vdaf>30时 C=1~2.5;当vdaf<=30时&nbsp;&nbsp;C=-0.25Vdaf+10
                        <div class="modal-footer">
                            <button type="button" class="btn default" data-dismiss="modal">
                                确定</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">

            </div>
        </div>
    </div>
</div>
<input type="hidden" id="caseId" value="${caseId}" name="caseId">
<input type="hidden" id="addFlag" value="${efficiency==null?"add":"edit"}" name="addFlag">
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script src="<c:url value="/js/boiler/efficiency1.js"/>" type="text/javascript"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/DataTables/media/js/jquery.dataTables.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.core-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.excheck-3.5.min.js"/>"></script>

<script>
    $(document).ready(function () {
        var caseId = $("#caseId").val();
        var step='<%=request.getAttribute("step")==null?"":request.getAttribute("step")%>'
        if (caseId == ""||step!="") {
            var obj=getUrlByStep(step)
            toast.error(obj.message);
            setTimeout(function () {
                window.location.href = obj.url;
            }, 1200);
        }
        efficiency.init();
        efficiency.e52StateClick($("#e52State"),1)
        efficiency.e89StateClick($("#e89State"),1)
        efficiency.e90StateClick($("#e90State"),1)
        efficiency.e92StateClick($("#e92State"),1)
        efficiency.e94StateClick($("#e94State"),1)
        efficiency.e93StateClick($("#e93State"),1)
        efficiency.e95StateClick($("#e95State"),1)
    })
</script>

<script type="text/javascript">
    $(function () {
        <%
        String message = (String) request.getAttribute("message");
        if(message!=null&&!"".equals(message)){
        if(message.equals("success")){
        %>
        toast.success("操作成功");
        <%
        }else{
        %>
        toast.error("<%=request.getAttribute("message")%>");
        <%
         }
            }
       %>
    });
</script>
</body>
</html>
